package com.ruoyi.imports.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.imports.mapper.TdOperatingParamsMapper;
import com.ruoyi.imports.domain.TdOperatingParams;
import com.ruoyi.imports.service.ITdOperatingParamsService;

/**
 * 工艺参数Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-14
 */
@Service
public class TdOperatingParamsServiceImpl implements ITdOperatingParamsService 
{
    @Autowired
    private TdOperatingParamsMapper tdOperatingParamsMapper;

    /**
     * 查询工艺参数
     * 
     * @param id 工艺参数主键
     * @return 工艺参数
     */
    @Override
    public TdOperatingParams selectTdOperatingParamsById(Long id)
    {
        return tdOperatingParamsMapper.selectTdOperatingParamsById(id);
    }

    /**
     * 查询工艺参数列表
     * 
     * @param tdOperatingParams 工艺参数
     * @return 工艺参数
     */
    @Override
    public List<TdOperatingParams> selectTdOperatingParamsList(TdOperatingParams tdOperatingParams)
    {
        return tdOperatingParamsMapper.selectTdOperatingParamsList(tdOperatingParams);
    }

    /**
     * 新增工艺参数
     * 
     * @param tdOperatingParams 工艺参数
     * @return 结果
     */
    @Override
    public int insertTdOperatingParams(TdOperatingParams tdOperatingParams)
    {
        tdOperatingParams.setCreateTime(DateUtils.getNowDate());
        return tdOperatingParamsMapper.insertTdOperatingParams(tdOperatingParams);
    }

    /**
     * 修改工艺参数
     * 
     * @param tdOperatingParams 工艺参数
     * @return 结果
     */
    @Override
    public int updateTdOperatingParams(TdOperatingParams tdOperatingParams)
    {
        tdOperatingParams.setUpdateTime(DateUtils.getNowDate());
        return tdOperatingParamsMapper.updateTdOperatingParams(tdOperatingParams);
    }

    /**
     * 批量删除工艺参数
     * 
     * @param ids 需要删除的工艺参数主键
     * @return 结果
     */
    @Override
    public int deleteTdOperatingParamsByIds(Long[] ids)
    {
        return tdOperatingParamsMapper.deleteTdOperatingParamsByIds(ids);
    }

    /**
     * 删除工艺参数信息
     * 
     * @param id 工艺参数主键
     * @return 结果
     */
    @Override
    public int deleteTdOperatingParamsById(Long id)
    {
        return tdOperatingParamsMapper.deleteTdOperatingParamsById(id);
    }
}
